#!/usr/bin/env python
#
# validate.py
#
# Version : 0.9
# Date : 20080707
#
# Author : Bernard Czenkusz
# Email  : bernie@skipole.co.uk

#
# gui_globals.py - used in the sm_gui package to hold and set gui global
# variables run as part of skipolemonitor
# Copyright (c) 2007 Bernard Czenkusz
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

"""gui_globals.py - used in the sm_gui package to hold and set gui global variables

It consists of a set of functions, used by other modules in the sm_gui package
which read or set various data variables used by the gui
""" 

import wx
from net import *

# HOST_STATS is available via the net module
# HOST_STATS=[Total number of hosts, number of red hosts, yellow hosts, green hosts]
# used to display the icons showing the host status

# SCRIPTDIRECTORY is available from the net module
# it is the directory where the script is kept

# SM_VERSION is a text string of the version number of the Skipole monitor program,
# as displayed by the gui
SM_VERSION="0.8"


def get_icon():
    """This defines the image to use to create the windows top left icons"""
    # For linux systems
    iconfile=os.path.join(SCRIPTDIRECTORY, 'monitor.png')
    iconimage = wx.Icon(iconfile, wx.BITMAP_TYPE_PNG)
    #
    # For windows
    if os.name == "nt":
        iconfile=os.path.join(SCRIPTDIRECTORY, 'monitor.ico')
        iconimage = wx.Icon(iconfile, wx.BITMAP_TYPE_ICO)
    #
    return iconimage




